dependencies = [
"advapi32-sys 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"curl 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.6.30 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.6.31 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
"log 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
dependencies = [
"curl-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "docopt"
-version = "0.6.30"
+version = "0.6.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"regex 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "git2"
-version = "0.1.11"
+version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "libgit2-sys"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libssh2-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "time"
-version = "0.1.12"
+version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "url"
-version = "0.2.16"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
impl Error for PackageIdError {
fn description(&self) -> &str { "failed to parse package id" }
- fn detail(&self) -> Option<String> {
- Some(match *self {
+}
+
+impl fmt::Display for PackageIdError {
+ fn fmt(self, f: fmt::Formatter) {
+ match self {
PackageIdError::InvalidVersion(ref v) => {
- format!("invalid version: {}", *v)
+ write!(f, "invalid version: {}", *v)
}
PackageIdError::InvalidNamespace(ref ns) => {
- format!("invalid namespace: {}", *ns)
+ write!(f, "invalid namespace: {}", *ns)
}
- })
+ }
}
}
impl Error for Box<CargoError> {
fn description(&self) -> &str { (**self).description() }
- fn detail(&self) -> Option<String> { (**self).detail() }
fn cause(&self) -> Option<&Error> { (**self).cause() }
}
impl<E: Error> Error for ChainedError<E> {
fn description(&self) -> &str { self.error.description() }
- fn detail(&self) -> Option<String> { self.error.detail() }
+}
+
+impl<E: fmt::Display> fmt::Display for ChainedError<E> {
+ fn fmt(&self, f: fmt::Formatter) {
+ fmt::Display::fmt(self.error, f)
+ }
}
impl<E: CargoError> CargoError for ChainedError<E> {
impl Error for ProcessError {
fn description(&self) -> &str { self.desc.as_slice() }
- fn detail(&self) -> Option<String> { None }
fn cause(&self) -> Option<&Error> {
self.cause.as_ref().map(|s| s as &Error)
}
impl Error for ConcreteCargoError {
fn description(&self) -> &str { self.description.as_slice() }
- fn detail(&self) -> Option<String> { self.detail.clone() }
fn cause(&self) -> Option<&Error> {
self.cause.as_ref().map(|c| &**c)
}
impl<E: Error> Error for Human<E> {
fn description(&self) -> &str { self.0.description() }
- fn detail(&self) -> Option<String> { self.0.detail() }
fn cause(&self) -> Option<&Error> { self.0.cause() }
}
+impl<E: fmt::Display> fmt::Display for Human<E> {
+ fn fmt(self, f: fmt::Formatter) {
+ fmt::Display::fmt(self.0, f)
+ }
+}
+
impl<E: CargoError> CargoError for Human<E> {
fn is_human(&self) -> bool { true }
fn cargo_cause(&self) -> Option<&CargoError> { self.0.cargo_cause() }
impl Error for CliError {
fn description(&self) -> &str { self.error.description() }
- fn detail(&self) -> Option<String> { self.error.detail() }
fn cause(&self) -> Option<&Error> { self.error.cause() }
}
+impl fmt::Display for CliError {
+ fn fmt(self, f: fmt::Formatter) {
+ fmt::Display::fmt(self.error, f)
+ }
+}
+
impl CliError {
pub fn new<S: Str>(error: S, code: u32) -> CliError {
let error = human(error.as_slice().to_string());